package com.taoist_awei.blog.infrastructure.mapper;

import com.taoist_awei.blog.core.ArticleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Mapper
public interface ArticleMapper {

    ArticleEntity findArticleById(@Param("articleId") String articleId);

    void updateArticle(@Param("article") ArticleEntity article);

    void insertArticle(@Param("article") ArticleEntity article);

    void deleteArticle(@Param("articleId") String articleId);

    void status(@Param("status") String status, @Param("articleId") String articleId);

    List<ArticleEntity> getArticleList(int begin, int size, @Param("status") String status);

    Integer getSize();
}
